package com.unknowpupil.eth.utils;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;

/**
 * @Classname: JsonUtils
 * @Author: <a> w10g </a>
 * @CreateDate: Create in 2020/1/3 17:48
 * @Description: 序列化
 * @Version: 1.0
 */
public class JsonUtils {
    public static String toJson(Object obj) {
        Gson gson = new GsonBuilder()
                .setPrettyPrinting()
                .create();
        return gson.toJson(obj);
    }
}
